# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-gtts-token
pkgver=1.1.4
pkgrel=2
pkgdesc="Calculates a token to run the Google Translate text to speech"
url="https://github.com/Boudewijn26/gTTS-token"
arch="noarch"
license="MIT"
depends="python3 py3-requests"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://github.com/Boudewijn26/gTTS-token/archive/v$pkgver/gTTS-token-v$pkgver.tar.gz"
# disable tests due to changes made to Google Translate in November 2020
# see https://github.com/Boudewijn26/gTTS-token/commit/8069867ca271d3ae562231f7ee34f12e80dbb6b6
options="!check" # Net required for tests
builddir="$srcdir/gTTS-token-$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="91e958cc34d8dd1284bf517c054bb48f3c9b751c9b7276eba177b69256a4e61aef6de6edd02274c28bf63de9d6fd3117d7df6b2d189eaf1c19a822089c3f82ef  gTTS-token-v1.1.4.tar.gz"
